// pages/form/form.js
Page({

  data: {
    hobbys: [],
    username: '',
    password: '',
    selectorItems: ['篮球', '足球', '排球'], 
    selectorValue: '',
    gender: '男'
  },

  onLoad: function (options) {
    
  },
  handleChange: function(e) {
    this.setData({
      hobbys: e.detail.value
    })
    console.log(this.data.hobbys)
  },
  setUsername: function(e) {
    this.setData({
      username: e.detail.value
    })
    console.log(this.data.username)
  },
  setPassword: function(e) {
    this.setData({
      password: e.detail.value
    })
    console.log(this.data.password)
  },
  selectorChange: function(e) {
    this.setData({
      selectorValue: this.data.selectorItems[e.detail.value]
    })
  },
  setDate: function(e) {
    console.log(e)
  },
  setGender: function(e) {
    this.setData({
      gender: e.detail.value
    })
    console.log(this.data.gender)
  }
})